﻿@model Vcare.Models.PayPalModel

<form id="hiddenform" action="@(Model.actionURL)" target="_blank">
@Html.HiddenFor(model => model.cmd)
@Html.HiddenFor(model => model.business)
@Html.HiddenFor(model => model.no_shipping)
@Html.HiddenFor(model => model.@return)
@Html.HiddenFor(model => model.cancel_return)
@Html.HiddenFor(model => model.notify_url)
@Html.HiddenFor(model => model.currency_code)
@Html.HiddenFor(model => model.item_name)
@Html.HiddenFor(model => model.amount)
<input type="hidden" name="first_name" value="@(ViewBag.first_name)" />
<input type="hidden" name="last_name" value="@(ViewBag.last_name)" />
<input type="hidden" name="address1" value="@(ViewBag.address1)" />
<input type="hidden" name="city" value="@(ViewBag.city)" />
<input type="hidden" name="country" value="GB" />
<input type="hidden" name="email" value="@(ViewBag.email)" />
<input type="hidden" name="zip" value="@(ViewBag.zip)" />
<input type="hidden" name="H_PhoneNumber" value="@(ViewBag.phone)" />
<input type="hidden" name="state" value="@(ViewBag.state)" />
</form>
<h3>
Connecting to Paypal , please wait …
</h3>
<div class="spacer"></div>
<div class="spacer"></div>

@Scripts.Render("~/bundles/jquery")

<script type="text/javascript" language="javascript">
    $(this.document).ready(function () {
        var form = $("form");
        form.submit();
    });
</script>